package com.light.sys.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.light.common.mybatisplus.MybatisPlusHelper;
import com.light.common.base.BaseServiceImpl;

import java.io.Serializable;
import java.util.List;

import com.light.sys.query.SysRoleQuery;
import com.light.sys.mapper.SysRoleMapper;
import com.light.sys.domain.SysRoleDO;
import com.light.sys.service.SysRoleService;



@Service
public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleDO, SysRoleMapper> implements SysRoleService {
	@Autowired
	private SysRoleMapper sysRoleMapper;
	
	@Override
	public List<SysRoleDO> data(SysRoleQuery sysRoleQuery){
		QueryWrapper<SysRoleDO> queryWrapper = MybatisPlusHelper.setQueryWrapperPageParam(sysRoleQuery.createQueryWrapper(),sysRoleQuery);
		return sysRoleMapper.selectList(queryWrapper);
	}
	
	@Override
	public int count(SysRoleQuery sysRoleQuery){
		return sysRoleMapper.selectCount(sysRoleQuery.createQueryWrapper());
	}

}
